package com.it.liulang;

import com.it.liulang.config.SpringConfig;
import com.it.liulang.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SpringIoc {
    public static void main(String[] args) throws Exception {
        ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfig.class);
        UserService bean = ac.getBean(UserService.class);
        bean.save();
    }
}
